﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using GroupsClassLIB;
using UtilityClassLIB;

namespace GroupsServiceLibrary
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    public class GroupsService1 : IGroupsService1
    {
        GroupsClass group_obj = new GroupsClass();
        UtilityClass utility_obj = new UtilityClass();

        public DataTable FillDataTable(string dtb)
        {
            DataTable dt = new DataTable();
            dt = utility_obj.fillDataTable(dtb);
            return dt;
        }

        public string InsertRowinGroupTable(string gn, string gp, string gdp)
        {
            string results = "";
            results = group_obj.InsertRowinGroupTable(gn, gp, gdp);
            return results;
        }

        public string UpdateGroup(string gid, string gn, string gp, string gd)
        {
            string results = "";
            results = group_obj.UpdateGroup(gid, gn, gp, gd);
            return results;
        }

        public string DeleteGroup(string gid, string gn, string gp, string gd)
        {
            string results = "";
            results = group_obj.DeleteGroup(gid, gn, gp, gd);
            return results;
        }
    }
}
